/**
 * @Classname ComputerBuilder
 * @Description TODO
 * @Date 2023/8/15 15:54
 * @Created by wpc
 */
public class ComputerBuilder {

    private Computer computer;
    private String cpu;
    private String mainBoard;
    private String runningMemory;
    private String stateDrive;
    private String fan;
    private String waterCooling;
    private String chassis;

    public ComputerBuilder setCpu(String cpu) {
        this.cpu = cpu;
        return this;
    }

    public ComputerBuilder setMainBoard(String mainBoard) {
        this.mainBoard = mainBoard;
        return this;
    }

    public ComputerBuilder setRunningMemory(String runningMemory) {
        this.runningMemory = runningMemory;
        return this;
    }

    public ComputerBuilder setStateDrive(String stateDrive) {
        this.stateDrive = stateDrive;
        return this;
    }

    public ComputerBuilder setFan(String fan) {
        this.fan = fan;
        return this;
    }

    public ComputerBuilder setWaterCooling(String waterCooling) {
        this.waterCooling = waterCooling;
        return this;
    }

    public ComputerBuilder setChassis(String chassis) {
        this.chassis = chassis;
        return this;
    }

    public String getCpu() {
        return cpu;
    }

    public String getMainBoard() {
        return mainBoard;
    }

    public String getRunningMemory() {
        return runningMemory;
    }

    public String getStateDrive() {
        return stateDrive;
    }

    public String getFan() {
        return fan;
    }

    public String getWaterCooling() {
        return waterCooling;
    }

    public String getChassis() {
        return chassis;
    }

    public Computer build(){
        computer = new Computer();
        computer.setCpu(getCpu());
        computer.setFan(getFan());
        computer.setMainBoard(getMainBoard());
        computer.setStateDrive(getStateDrive());
        computer.setRunningMemory(getRunningMemory());
        computer.setWaterCooling(getWaterCooling());
        computer.setChassis(getChassis());
        return computer;
    }
}
